import VueRouter from 'vue-router'

import HomeContainer from './components/tabbar/HomeContainer.vue'
import NewsList from './components/news/newslist.vue'
import NewsInfo from './components/news/NewsInfo.vue'
import PhotoList from './components/photos/photolist.vue'
import PhotoInfo from './components/photos/photoinfo.vue'
import GoodsList from './components/goods/goodslist.vue'
import Goodsinfo from './components/goods/goodsinfo.vue'
import GoodsDesc from './components/goods/goodsdesc.vue'
import GoodsComment from './components/goods/goodscomment.vue'
import ContactInfo from './components/contact/contactinfo.vue'
import Message from './components/message/message.vue'
import VideoList from './components/video/videolist.vue'

import MemberContainer from './components/tabbar/MemberContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'

var router = new VueRouter({
    routes: [{
            path: '/',
            redirect: '/home'
        },
        {
            path: '/home',
            component: HomeContainer
        },
        {
            path: '/member',
            component: MemberContainer
        },
        {
            path: '/shopcar',
            component: ShopcarContainer
        },
        {
            path: '/search',
            component: SearchContainer
        },
        {
            path: '/home/newslist',
            component: NewsList
        },
        {
            path: '/home/newsinfo/:id',
            component: NewsInfo
        }, 
        {
            path: '/home/photolist',
            component: PhotoList
        },
        {
            path: '/home/photoinfo/:id',
            component: PhotoInfo
        },
        {
            path: '/home/goodslist',
            component: GoodsList
        },
        {
            path: '/home/goodsinfo/:id',
            component: Goodsinfo
        },
        {
            path: '/home/goodsdesc/:id',
            component: GoodsDesc
        },
        {
            path: '/home/goodscomment/:id',
            component: GoodsComment
        },
        {
            path: '/home/contact',
            component: ContactInfo
        },
        {
            path: '/home/message',
            component: Message
        },
        {
            path: '/home/video',
            component: VideoList
        }
    ],
    linkActiveClass: 'mui-active'
})

export default router